package com.yuwei.database.dao

import androidx.room.*
import com.yuwei.database.entity.FavVideoEntity

@Dao
interface FavVideoDao {
    @Insert
    suspend fun insert(favVideoEntity: FavVideoEntity)
    @Query("SELECT * FROM fav_video_info WHERE video_id = :videoId")
    suspend fun getFavById(videoId: Int): List<FavVideoEntity>
    @Query("SELECT * FROM fav_video_info WHERE is_love = 1")
    suspend fun getAll(): List<FavVideoEntity>
    @Update
    suspend fun update(favVideoEntity: FavVideoEntity)
}